#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 10
int *find_largest(int a[], int n);
int main(void)
{
    srand((unsigned) time(NULL));
    int a[N];
    for (int i = 0; i < N; i++)
        a[i] = rand() % 100;
    for (int i = 0; i < N; i++)
        printf("%s%d%s", i ? ", " : "", a[i], N - 1 - i ? "" : "\n");
    int *p;
    p = find_largest(a, N);
    printf("%d\n", *p);
    return 0;
}
int *find_largest(int a[], int n) {
    int *p = &a[0];
    for (int i = 1; i < n; i++)
        if (*p < a[i])
            p = &a[i];
    return p;
}